import * as echarts from "echarts";
export const getRegisterCountOption = () => {
  return {
    title: {
      top: 15,
      left: 10,
      textStyle: {
        fontSize: 16,
        color: "#fff",
      },
      text: "提案立案数变化趋势",
    },
    tooltip: [
      {
        trigger: "axis",
        axisPointer: {
          type: "cross",
        },
      },
    ],
    legend: {
      right: 10,
      top: 15,
      textStyle: {
        fontSize: 13,
        color: "#2F89CF",
      },
      data: [
        {
          name: "提案立案数",
        },
      ],
    },
    grid: {
      left: "5%",
      right: "2%",
      bottom: "3%",
      top: "20%",
      containLabel: true,
    },
    xAxis: {
      type: "category",
      boundaryGap: false,
      data: [
        "2014",
        "2015",
        "2016",
        "2017",
        "2018",
        "2019",
        "2020",
        "2021",
        "2022",
        "2023",
      ],
      axisLabel: {
        margin: 30,
      },
      axisLine: {
        show: false,
      },
      axisTick: {
        show: true,
        length: 25,
        lineStyle: {
          color: "#ffffff1f",
        },
      },
      splitLine: {
        show: true,
        lineStyle: {
          color: "#ffffff1f",
        },
      },
    },
    yAxis: [
      {
        type: "value",
        position: "right",
        axisLabel: {
          margin: 20,
        },

        axisTick: {
          show: true,
          length: 15,
          lineStyle: {
            color: "#ffffff1f",
          },
        },
        splitLine: {
          show: true,
          lineStyle: {
            color: "#ffffff1f",
          },
        },
        axisLine: {
          lineStyle: {
            width: 2,
          },
        },
      },
    ],
    series: [
      {
        name: "提案立案数",
        type: "line",
        smooth: true, //是否平滑曲线显示
        showAllSymbol: true,
        symbol: "circle",
        symbolSize: 6,
        lineStyle: {
          color: "#4B7EFE", // 线条颜色
        },
        label: {
          show: true,
          position: "top",
          textStyle: {
            color: "#4B7EFE",
          },
        },
        itemStyle: {
          color: "#fff",
          borderColor: "#4B7EFE",
          borderWidth: 3,
        },
        tooltip: {
          show: true,
        },
        areaStyle: {
          color: new echarts.graphic.LinearGradient(
            0,
            0,
            0,
            1,
            [
              {
                offset: 0,
                color: "#4B7EFE",
              },
              {
                offset: 1,
                color: "#3fbbff0d",
              },
            ],
            false
          ),
        },
        data: [393, 438, 485, 631, 689, 824, 987, 1000, 1100, 1200],
      },
    ],
  };
};
